#!/bin/sh
source /etc/profile

echo "start all game server begin!"

nohup java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9875 -Djava.rmi.server.hostname=0.0.0.0 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1905 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xms256M -Xmx512M -verbose:gc -Xloggc:/game/logs/gateway-gc.log -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/game/dump/gateway.dat -Djava.security.egd=file:/dev/./urandom  -jar /game/game-gateway.jar >/game/logs/gateway.log 2>&1 &

echo "start game gateway server success!"

nohup java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9879 -Djava.rmi.server.hostname=0.0.0.0 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1909 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xms256M -Xmx512M -verbose:gc -Xloggc:/game/logs/web-gateway-gc.log -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/game/dump/web-gateway.dat -Djava.security.egd=file:/dev/./urandom -jar /game/game-web-gateway.jar >/game/logs/web-gateway.log 2>&1 &

echo "start game web gateway server success!"

nohup java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9878 -Djava.rmi.server.hostname=0.0.0.0 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1908 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xms256M -Xmx512M -verbose:gc -Xloggc:/game/logs/logic-server-gc.log -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/game/dump/logic-server.dat -Djava.security.egd=file:/dev/./urandom -jar /game/game-logic-server.jar >/game/logs/logic-server.log 2>&1 &

echo "start game logic server success!"

nohup java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9880 -Djava.rmi.server.hostname=0.0.0.0 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1910 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xms256M -Xmx512M -verbose:gc -Xloggc:/game/logs/user-center-gc.log -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/game/dump/user-center.dat -Djava.security.egd=file:/dev/./urandom  -jar  /game/game-user-center.jar >/game/logs/user-center.log 2>&1 &

echo "start game user center server success!"

nohup java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9884 -Djava.rmi.server.hostname=0.0.0.0 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1904 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xms256M -Xmx512M -verbose:gc -Xloggc:/game/logs/game-manager-gc.log -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/game/dump/game-manager.dat -Djava.security.egd=file:/dev/./urandom  -jar  /game/game-manager.jar >/game/logs/game-manager.log 2>&1 &

echo "start game manager server success!"
